<script setup lang='ts'>
  import { admin_id, editableTabs } from '@/pinia/getter';
  import { useRouter } from 'vue-router';
  import { control } from '@/pinia/modules/control';
  const $router = useRouter()
  const gopage = ()=>{
    const tabsList = editableTabs.value
    const index = tabsList.findIndex(res=>res.name == 'Error')
    if(index == -1) {
      tabsList.splice(index,1)
    } 
    control().editEditableTabs(tabsList)
    $router.push({path:'/'})
  }
</script>

<template>
  <div>
    
    <el-result
      icon="error"
      title="Error Tip"
      sub-title="404"
    >
      <template v-if="admin_id" #extra>
        <el-button @click="gopage" type="primary">返回主页</el-button>
      </template>
    </el-result>
  </div>
</template>

<style lang='scss' scoped>

</style>